package com.it.controller;

import com.it.pojo.MonthIncome;
import com.it.service.IcourseOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author hp
 * income 收入
 */
@Controller
@RequestMapping("dataAnalysis")
public class DataAnalysisController {
    @Autowired
    IcourseOrderService icourseOrderService;
    @RequestMapping("income")
    public String income(){
        return "dataanalysis/income";
    }
    @RequestMapping("getMonthIncomes")
    @ResponseBody
    public List<MonthIncome> getMonthIncomes(){
        List<MonthIncome> list=icourseOrderService.getMonthIncomes();
        return list;
    }

}
